package ex2;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

public class Main {
	
	public static void main(String[] args) {
		
		try{
						
		URL url = new URL("http://cnds.students.dk/example2.php?year=2009&month=august");
		InputStreamReader r = new InputStreamReader(url.openStream());
		BufferedReader in = new BufferedReader(r);
		String str;
		while ((str = in.readLine()) != null) {
		System.out.println(str);
		}
		in.close();
		
		}
		catch (IOException e) {
			// TODO: handle exception
		}
		catch (Exception e) {
			
			// TODO: handle exception
		}
	}

}
